/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: Faculty of informatics, Burapha University 01
 * License Type: Purchased
 */
package cn.imvc.app.entities;

import java.io.Serializable;
import javax.persistence.*;
@Entity
@org.hibernate.annotations.Proxy(lazy=false)
@Table(name="activity")
public class Activity implements Serializable {
	public Activity() {
	}
	
	private int id;
	
	private String name;
	
	private String description;
	
	private Byte type;
	
	private Integer limitMoney;
	
	private java.util.Date startDate;
	
	private java.util.Date endDate;
	
	private Byte state;
	
	private Byte sort;
	
	private Integer discountMoney;
	
	private String skuId;
	
	private String skuName;
	
	public void setId(int value) {
		this.id = value;
	}
	
	@Column(name="id", nullable=false)	
	@Id	
	@GeneratedValue(generator="CN_IMVC_APP_ENTITIES_ACTIVITY_ID_GENERATOR")	
	@org.hibernate.annotations.GenericGenerator(name="CN_IMVC_APP_ENTITIES_ACTIVITY_ID_GENERATOR", strategy="identity")	
	public int getId() {
		return id;
	}
	
	@Transient	
	public int getORMID() {
		return getId();
	}
	
	/**
	 * 活动名称
	 */
	public void setName(String value) {
		this.name = value;
	}
	
	/**
	 * 活动名称
	 */
	@Column(name="name", nullable=true, length=255)	
	public String getName() {
		return name;
	}
	
	/**
	 * 说明
	 */
	public void setDescription(String value) {
		this.description = value;
	}
	
	/**
	 * 说明
	 */
	@Column(name="description", nullable=true, length=255)	
	public String getDescription() {
		return description;
	}
	
	/**
	 * 活动类型 10满送商品  20满减金额
	 */
	public void setType(byte value) {
		setType(new Byte(value));
	}
	
	/**
	 * 活动类型 10满送商品  20满减金额
	 */
	public void setType(Byte value) {
		this.type = value;
	}
	
	/**
	 * 活动类型 10满送商品  20满减金额
	 */
	@Column(name="type", nullable=true)	
	public Byte getType() {
		return type;
	}
	
	/**
	 * 金额订单限额
	 */
	public void setLimitMoney(int value) {
		setLimitMoney(new Integer(value));
	}
	
	/**
	 * 金额订单限额
	 */
	public void setLimitMoney(Integer value) {
		this.limitMoney = value;
	}
	
	/**
	 * 金额订单限额
	 */
	@Column(name="limitMoney", nullable=true, length=10)	
	public Integer getLimitMoney() {
		return limitMoney;
	}
	
	/**
	 * 开始时间
	 */
	public void setStartDate(java.util.Date value) {
		this.startDate = value;
	}
	
	/**
	 * 开始时间
	 */
	@Column(name="startDate", nullable=true)	
	@Temporal(TemporalType.TIMESTAMP)	
	public java.util.Date getStartDate() {
		return startDate;
	}
	
	/**
	 * 结束时间
	 */
	public void setEndDate(java.util.Date value) {
		this.endDate = value;
	}
	
	/**
	 * 结束时间
	 */
	@Column(name="endDate", nullable=true)	
	@Temporal(TemporalType.TIMESTAMP)	
	public java.util.Date getEndDate() {
		return endDate;
	}
	
	/**
	 * 活动状态 0无效 1有效
	 */
	public void setState(byte value) {
		setState(new Byte(value));
	}
	
	/**
	 * 活动状态 0无效 1有效
	 */
	public void setState(Byte value) {
		this.state = value;
	}
	
	/**
	 * 活动状态 0无效 1有效
	 */
	@Column(name="state", nullable=true)	
	public Byte getState() {
		return state;
	}
	
	/**
	 * 排序
	 */
	public void setSort(byte value) {
		setSort(new Byte(value));
	}
	
	/**
	 * 排序
	 */
	public void setSort(Byte value) {
		this.sort = value;
	}
	
	/**
	 * 排序
	 */
	@Column(name="sort", nullable=true)	
	public Byte getSort() {
		return sort;
	}
	
	/**
	 * 优惠金额
	 */
	public void setDiscountMoney(int value) {
		setDiscountMoney(new Integer(value));
	}
	
	/**
	 * 优惠金额
	 */
	public void setDiscountMoney(Integer value) {
		this.discountMoney = value;
	}
	
	/**
	 * 优惠金额
	 */
	@Column(name="discountMoney", nullable=true, length=10)	
	public Integer getDiscountMoney() {
		return discountMoney;
	}
	
	public void setSkuId(String value) {
		this.skuId = value;
	}
	
	@Column(name="skuId", nullable=true, length=500)	
	public String getSkuId() {
		return skuId;
	}
	
	public void setSkuName(String value) {
		this.skuName = value;
	}
	
	@Column(name="skuName", nullable=true, length=500)	
	public String getSkuName() {
		return skuName;
	}
	
	public String toString() {
		return toString(false);
	}
	
	public String toString(boolean idOnly) {
		if (idOnly) {
			return String.valueOf(getId());
		}
		else {
			StringBuffer sb = new StringBuffer();
			sb.append("Activity[ ");
			sb.append("Id=").append(getId()).append(" ");
			sb.append("Name=").append(getName()).append(" ");
			sb.append("Description=").append(getDescription()).append(" ");
			sb.append("Type=").append(getType()).append(" ");
			sb.append("LimitMoney=").append(getLimitMoney()).append(" ");
			sb.append("StartDate=").append(getStartDate()).append(" ");
			sb.append("EndDate=").append(getEndDate()).append(" ");
			sb.append("State=").append(getState()).append(" ");
			sb.append("Sort=").append(getSort()).append(" ");
			sb.append("DiscountMoney=").append(getDiscountMoney()).append(" ");
			sb.append("SkuId=").append(getSkuId()).append(" ");
			sb.append("SkuName=").append(getSkuName()).append(" ");
			sb.append("]");
			return sb.toString();
		}
	}
	
}
